/*
 *  This is the SmartCar Standing Code;
 *  Copyright (C) 2011-2012 WenX, SEU, P.R.China <wenxiao1992@gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
#include <hidef.h>      /* common defines and macros */
#include "derivative.h"      /* derivative-specific definitions */
#include "ERROR.h"
#include "Show.h"
#include "Input.h"
#include "speedctrl.h"
#include "calcDis.h"
#include "mma845x.h"
#include "solve.h"
#include "sci.h"
//#include "MMA8452_Read_and_Filter.h"

#include "Interrupt.h"
#include "ATD.h"

#include "Initial.h"
//#define LEDCLR() LEDStates=0xFF;
//num:[0,7] which LED; state:[]

int test_stp;
float aa,bb,cc,dd;
int qq,ww,ee,rr;

void main(void) {
  /* put your own code here */
  SetBusClock();
  InitGPIO();
  CLRLED();
  Show();
  SciInit();
  
  
  //lvbo();
  

	EnableInterrupts;  
	
	while(1){
	  _FEED_COP(); /* feeds the dog */
	}
	
  for(;;) {
    
  } /* loop forever */
  /* please make sure that you never leave main */
}



